<!DOCTYPE html>
<html>
    <head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>{$reply['title']}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=yes;" />
    <script src="../addons/haoman_bcake/images/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript"> 
        $(document).ready(function(){

       setTimeout("location.href='{php echo $this->createMobileUrl('index', array('id' => $rid))}'",{php echo $reply['timead']*1000});
    })
      
    </script> 
</head>
<style>
  body{background-color:{if empty($reply['backcolor'])}#E47236{else}{$reply['backcolor']}{/if};}
	img{max-width:100%!important;}
  body,div{margin:0; padding:0;}
  #FontScroll{width:100%;height:50px;line-height:50px;overflow:Hidden;padding:5px 0;text-align: center;position: fixed;background: rgba(0, 0, 0, .4);}
  #FontScroll{color:#FDFDA2;}
</style>

<body>

<div id="FontScroll">
  <span id="t_s">{$reply['timead']}</span>秒后将自动进入活动首页....
    <script>
        var times = $('#t_s');
        timess = setInterval(function() {
            var currSecond = parseInt(times.html());
            currSecond--;
            if (currSecond == 0) {
                return;
            }
            times.html(currSecond);
        }, 1000);
    </script>
</div>
<div style="position:absolute; width:100%; height:100%; z-index:-1">
    {if empty($reply['timeadurl'])}{else}
    <a href="{$reply['timeadurl']}">
     {/if}
        <img style="position:fixed;" src="{php echo toimage($reply['tiemadpic'])}" width="100%" height="100%" />
        {if empty($reply['timeadurl'])}{else}
    </a>
        {/if}
</div>

</body>


<!-- 微信分享设置 -->
    <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript">

    // JS分享借用权限开始
    <?php
        $jssdk = new JSSDK();
        $package = $jssdk->GetSignPackage();
    ?>
    // JS分享借用权限结束

    wx.config({
       debug:false,
       appId: '{$package["appId"]}',
       timestamp: '{$package["timestamp"]}',
       nonceStr: '{$package["nonceStr"]}',
       signature: '{$package["signature"]}',
       jsApiList: [
        {if $reply['share_type'] != 2}'onMenuShareTimeline','onMenuShareAppMessage','onMenuShareWeibo'{/if}
       ]
    });
    var sharedata = {
        "imgUrl" : "{$shareimg}",
        "link" : "{$sharelink}",
        "desc" : "{$sharedesc}",
        "title" : "{$sharetitle}"
    };

    wx.ready(function () {
        {if $reply['share_type'] == 2}
        wx.hideOptionMenu();
        {else if $reply['share_type'] == 1}
        wx.showOptionMenu();
        wx.onMenuShareAppMessage(sharedata);
        wx.onMenuShareTimeline({
            title: '{$sharetitle}', // 分享标题
            link: '{$sharelink}', // 分享链接
            imgUrl: '{$shareimg}', // 分享图标
            success: function () { 
                var submitData = {
                    isshare: 1,
                };
                $.post('{php echo $this->createMobileUrl('setshare', array('rid' => $rid))}', submitData, function(data) {
                    if (data.success == 1) {
                        location.href="{php echo $this->createMobileUrl('index2', array('rid' => $rid))}";
                    } else {
                        alert(data.msg);
                        return
                    }
                },"json")
            },
            cancel: function () { 
                alert("您没有成功分享到朋友圈！");
            }
        });
        wx.onMenuShareQQ(sharedata);
        wx.onMenuShareWeibo(sharedata);
        {else}
        wx.showOptionMenu();
        wx.onMenuShareAppMessage(sharedata);
        wx.onMenuShareTimeline(sharedata);
        wx.onMenuShareQQ(sharedata);
        wx.onMenuShareWeibo(sharedata);
        {/if}
    });


</script>

</html>